//
//  ProgressImageView.swift
//  CXSwiftWB
//
//  Created by meidaeriOS on 2017/6/12.
//  Copyright © 2017年 meidaer. All rights reserved.
//

import UIKit
import SnapKit

class ProgressImageView: UIImageView {

    var prg: CGFloat = 0.0 {
        didSet {
            progresView.progress = prg
        }
    }
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        setupUI()
    }
    
    required init?(coder aDecoder: NSCoder) {
      //  fatalError("init(coder:) has not been implemented")
        super.init(coder: aDecoder)
        setupUI()
    }
    
    private func setupUI() {
        progresView.backgroundColor = UIColor.green
        addSubview(progresView)
        progresView.frame = bounds
        
//        progresView.snp.makeConstraints { (make) in
//            make.margins.equalToSuperview()
//        }
    }
    
    private lazy var progresView: ProgressView = ProgressView()
}
